package com.jic.manager.controller.manage.merchant;

import com.alibaba.fastjson.JSON;
import com.jic.common.base.vo.PageResult;
import com.jic.common.base.vo.RestResult;
import com.jic.manager.entity.Merchant;
import com.jic.manager.entity.MerchantWeBankBrand;
import com.jic.manager.request.MerchantRequest;
import com.jic.manager.service.MerchantWeBankBrandService;
import com.jic.product.after.request.SaveProductRequest;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apiguardian.api.API;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * Created by Intellij IDEA.
 *
 * @author:  cjw
 * Date:  2020/12/8
 */
@RestController
@RequestMapping("/merchantWeBankBrand")
@Slf4j
@Api(value = "商户品牌信息Controller")
public class MerchantWeBankBrandController {

    @Resource
    private MerchantWeBankBrandService merchantWeBankBrandService;


    @PostMapping(value = "/queryPage")
    @ApiOperation(value = "查询商户品牌信息列表")
    public RestResult<PageResult<MerchantWeBankBrand>> queryPage(@RequestBody MerchantWeBankBrand merchantWeBankBrand){
        return merchantWeBankBrandService.queryPage(merchantWeBankBrand);
    }

    @PostMapping(value = "/insert")
    @ApiOperation(value = "添加商户品牌信息列表")
    public RestResult insert(@RequestBody MerchantWeBankBrand merchantWeBankBrand){
        log.info("新增商户品牌信息接收参数： {}", JSON.toJSONString(merchantWeBankBrand));
        return merchantWeBankBrandService.insert(merchantWeBankBrand);
    }

}
